home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
VISUALBA
/
STBA2.ZIP
/
MAIN.FRM
< prev
next >
Wrap
Text File
|
1993-03-16
|
7KB
|
232 lines
VERSION 2.00
Begin MDIForm fmMain
Caption = "Stbar Example Main Form"
Height = 4935
Left = 1755
LinkTopic = "MDIForm1"
Top = 1755
Width = 7485
Begin PictureBox piStBar
Align = 2 'Align Bottom
BorderStyle = 0 'None
Height = 615
Left = 0
ScaleHeight = 615
ScaleWidth = 7365
TabIndex = 0
Top = 3630
Width = 7365
Begin StBar sbEnd
Prop21 = -1
Prop22 = 6
BackColor = &H00C0C0C0&
DrawMode = 1 'Flat
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Indicator = 0 'None
Left = 7650
Top = 270
Width = 855
End
Begin StBar sbEdit
Prop21 = -1
Prop22 = 5
BackColor = &H00C0C0C0&
Caption = "EINF"
DrawMode = 0 'Down
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Indicator = 4 'EditMode
Left = 7020
Top = 270
Width = 630
End
Begin StBar sbScroll
Prop21 = -1
Prop22 = 4
BackColor = &H00C0C0C0&
DrawMode = 0 'Down
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Indicator = 3 'Scroll
Left = 6390
Top = 270
Width = 630
End
Begin StBar sbCaps
Prop21 = -1
Prop22 = 3
BackColor = &H00C0C0C0&
DrawMode = 0 'Down
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Indicator = 2 'Caps
Left = 5760
Top = 270
Width = 630
End
Begin StBar sbNum
Prop21 = -1
Prop22 = 2
BackColor = &H00C0C0C0&
DrawMode = 0 'Down
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Indicator = 1 'Num
Left = 5130
Top = 270
Width = 630
End
Begin StBar sbMain
Prop21 = -1
Prop22 = 1
BackColor = &H00C0C0C0&
DrawMode = 0 'Down
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Indicator = 0 'None
Left = 0
Top = 270
Width = 5130
End
End
Begin Menu muMenu1
Caption = "Menu 1"
Begin Menu muItem11
Caption = "Item 1_1"
End
Begin Menu muItem12
Caption = "Item 1_2"
End
End
Begin Menu muMenu2
Caption = "Menu 2"
End
Begin Menu muWindow
Caption = "Window"
WindowList = -1 'True
Begin Menu muWindowOpen
Caption = "Open Child"
End
Begin Menu muWindowClose
Caption = "Close Child"
End
End
End
Option Explicit
Sub MDIForm_Load ()
piStBar.Height = sbMain.Height
muMenu1.Tag = "Menu1.Tag"
muMenu2.Tag = "Menu2.Tag"
muItem11.Tag = "Item_1_1.Tag"
muItem12.Tag = "Item_1_2.Tag"
muWindow.Tag = "Open, Close, Select MDI child windows"
muWindowOpen.Tag = "Opens a new document window"
muWindowClose.Tag = "Close the active child"
End Sub
Sub muWindow_Click ()
If Forms.Count > 1 Then
muWindowClose.Enabled = True
Else
muWindowClose.Enabled = False
End If
End Sub
Sub muWindowClose_Click ()
Unload fmMain.ActiveForm
End Sub
Sub muWindowOpen_Click ()
Dim fmNew As New fmChild
fmNew.Show
End Sub
Sub sbMain_MenuSelect (Closing As Integer, MenuCaption As String)
If Closing <> 0 Then
Caption = "StBar Example Main Form"
sbMain.Caption = ""
Else
Caption = "Menu Caption: " + MenuCaption
End If
End Sub
Sub sbMain_SelectedTag (hWndForm As Integer, MenuTag As String)
Dim sText As String
Dim iChildMenu As Integer
' determine, if system menu of MDI child has been selected
If hWndForm = fmMain.hWnd Then
iChildMenu = False
Else
iChildMenu = True
End If
Select Case MenuTag
Case "SYS_SIZE"
sText = "Changes the window size"
Case "SYS_MOVE"
sText = "Changes the window position"
Case "SYS_MINIMIZE"
sText = "Reduces the window to an icon"
Case "SYS_MAXIMIZE"
sText = "Enlarges the window to full size"
Case "SYS_RESTORE"
sText = "Restores the window to normal size"
Case "SYS_TASKLIST"
sText = "Opens the task list"
Case "SYS_NEXT"
sText = "Switches to next window"
Case "SYS_SWITCH"
sText = "Switches to the selected document window"
Case "SYS_POPUP"
If iChildMenu Then
sText = "Move, size or close active window"
Else
sText = "Move, size or close application window"
End If
Case "SYS_CLOSE"
If iChildMenu Then
sText = "Closes the active window"
Else
sText = "Quits VSQLTool"
End If
Case Else
sText = MenuTag
End Select
sbMain.Caption = sText
End Sub